import React, { Component } from 'react'
 
export default class Event extends Component {
  change = (num) => {
    console.log(num);
  }
  render() {
    return (
      <div>
        {/* 必须要嵌套 不嵌套，会直接执行，不点击就会  */}
        <button onClick={ ()=>{
          this.change(100)
        }}>点我</button>

      </div>
    )
  }
}
